package com.hx.alipay.services.impl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hx.alipay.dao.UserMapper;
import com.hx.alipay.pojo.User;
import com.hx.alipay.services.UserService;
import com.hx.alipay.util.MD5Util;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;

	@Override
	public User findUserLogin(String username, String password) {
		password = MD5Util.MD5EncodeUtf8(password);

		User user = userMapper.findUserLogin(username, password);
		user.setPassword(StringUtils.EMPTY);

		return user;
	}

}
